package java3_29;

import java.text.SimpleDateFormat;
import java.util.Calendar;

/**
 *7：学士后月考是每月的第一个周六，输出今年的月考时间
 */
public class Homework7 {
    public static void main(String[] args) {
        Calendar c = Calendar.getInstance();
        SimpleDateFormat format = new SimpleDateFormat();
        format.applyPattern("yyyy/MM/dd hh时");
        c.set(c.get(Calendar.YEAR),0,1,8,0);
        int a = c.get(Calendar.YEAR);

        while (true){
            if (c.get(Calendar.WEEK_OF_MONTH)==1&&c.get(Calendar.DAY_OF_WEEK)==Calendar.SATURDAY){
                System.out.println(format.format(c.getTime()));
            }
            if (c.get(Calendar.YEAR)!=a){
                return;
            }
            c.add(Calendar.DATE,1);
        }
    }
}
